<template>
  <div>
    <el-row v-for="(item, index) in commentList" :key="index">
      <el-col :span="24">
        <el-form-item :label="item.commentname + '于' + formatDate(item.createon) + '评论'" prop="commentdetail" label-width="200px">
          <el-input v-model="item.commentdetail" type="textarea" :autosize="{ minRows: 1, maxRows: 3 }" disabled></el-input>
        </el-form-item>
      </el-col>
    </el-row>
  </div>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
import { formatDate } from '@tapui/utils/date'
import { validateNull } from '@tapui/utils/validate'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: {},
  data() {
    return {
      moduleTitle: '评分细则专家拜访评论',
      urlPrefix: '/mpm/projectVisitComment/',
      url: {
        // 额外的url
      }
    }
  },
  props: {
    commentList: {
      type: Array,
      default: () => []
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
    },
    formatDate(date) {
      return validateNull(date) ? '' : formatDate(new Date(date ? date.toString().replace(/\-/g, '/') : date), 'yyyy-MM-dd')
    }
  }
}
</script>
